﻿<%@ Page Title="Edit" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="EditChurchService.aspx.cs" Inherits="MyLocalChurch.ChurchServices.EditChurchService" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <dav:MetadataSource runat="server" ID="msChurchService" ObjectType="<%$ Code: typeof(MyLocalChurch.Models.ChurchService) %>" />
    <h2>
        Edit Church Service
    </h2>
    <table>
        <tr>
            <td>Day of Week</td>
            <td><asp:DropDownList ID="ddlDayOfWeek" runat="server"></asp:DropDownList></td>
        </tr>
        <tr>
            <td>Start Time (HH:MM 24-hour Format)</td>
            <td>
                <asp:TextBox ID="txtStartTime" runat="server"></asp:TextBox>
                <dav:DataAnnotationsValidator ID="davStartTime" runat="server"
                    MetadataSourceID="msChurchService"
                    ControlToValidate="txtStartTime"
                    ObjectProperty="StartTime" />
            </td>
        </tr>
        <tr>
            <td>Description</td>
            <td>
                <asp:TextBox ID="txtDescription" runat="server" CssClass="fieldInputMultiline" TextMode="MultiLine" Rows="5"></asp:TextBox>
                <dav:DataAnnotationsValidator ID="davDescription" runat="server"
                    MetadataSourceID="msChurchService"
                    ControlToValidate="txtDescription"
                    ObjectProperty="Description" />
            </td>
        </tr>
        <tr>
            <td>Active</td>
            <td>
                <asp:CheckBox ID="chkActive" runat="server"/>
            </td>
        </tr>
    </table>
    <p>
        <asp:Button ID="btnSave" runat="server" CssClass="submitButton" Text="Save" OnClick="btnSave_Click"/>
        <a href="#" onclick="window.history.back();">Back</a>
    </p>
</asp:Content>
